package com.example.miaopin.fragment;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONObject;

import com.example.miaopin.MainActivity;
import com.example.miaopin.R;
import com.example.miaopin.adapter.ContentAdapter;
import com.example.miaopin.utils.ImageUtil;
import com.example.miaopin.utils.ImageUtils2;
import com.viewpagerindicator.TabPageIndicator;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.internal.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

/**
 * @author Administrator 大世界fragment
 */
public class DashijieF extends BaseFragment {

	private String[] CONTENT = new String[] { "秒评秒赞", "秒赞记录" };

	@Override
	protected View initview() {
		view = inflater1(R.layout.miaoping);
		List<Fragment> fragments = new ArrayList<Fragment>();
		YaunFragment yaunFragment = new YaunFragment();
		JiluFragment jiluFragment = new JiluFragment();
		fragments.add(yaunFragment);
		fragments.add(jiluFragment);
		ContentAdapter adapter = new ContentAdapter(((MainActivity) mContext).getSupportFragmentManager(),
				 CONTENT);
		ViewPager pager = (ViewPager) view.findViewById(R.id.viewpaget_m);
		ImageView image = (ImageView) view.findViewById(R.id.imagem);
		image.setImageBitmap(
				ImageUtils2.getRoundedCornerBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher1)));
		pager.setAdapter(adapter);

		TabPageIndicator indicator = (TabPageIndicator) view.findViewById(R.id.indicator);
		indicator.setViewPager(pager);
		return view;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void setTtitle(String string) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void setImage(Bitmap bitmap) {
		// TODO Auto-generated method stub
		
	}
}
